//
//  HSYBaseQRCodeViewController+Manager.h
//  高仿暴走斗图
//
//  Created by key on 16/3/23.
//  Copyright © 2016年 huangsongyao. All rights reserved.
//

#import "HSYBaseQRCodeViewController.h"

@interface HSYBaseQRCodeViewController (Manager)


/**
 *  获取扫描范围
 *
 *  @param rect             要扫描的框的范围
 *  @param readerViewBounds 整个透明区域的范围
 *
 *  @return
 */
- (CGRect)getScanLayerInViewForRect:(CGRect)rect readerViewBounds:(CGRect)readerViewBounds;

/**
 *  二维码扫描动画，模范微信
 *
 *  @param layer      扫描条
 *  @param toY        动画终点的y坐标
 *  @param completion 完成后的block
 */
- (void)starQRCodeAnimationInLayer:(CALayer *)layer toY:(NSNumber *)toY completion:(void(^)())completion;
+ (CABasicAnimation *)moveYTime:(CGFloat)time fromY:(NSValue *)fromY toY:(NSValue *)toY rep:(CGFloat)rep;

/**
 *  清除二维码扫描的动画
 *
 *  @param layer      扫描条
 *  @param completion 完成后的block
 */
- (void)removeQRCodeAnimationInLayer:(CALayer *)layer completion:(void(^)())completion;

@end
